using System;
using EPiServer.Common;
using EPiServer.Common.Queries;
using EPiServer.Common.Security;
using EPiServer.Common.Tags;

namespace EPiAbstractions.Common.Tags
{
    public interface ITagHandlerFacade
    {
        Tag AddTag(Tag tag);

        void RemoveTag(Tag tag);

        Tag GetTag(String name);

        Tag GetTag(Int32 id);

        TagCollection GetTags(Type type, ISite site, Int32 page, Int32 pageSize, out Int32 totalItems);

        TagCollection GetTags(Type type, ISite site, IUser user, Int32 page, Int32 pageSize, out Int32 totalItems);

        TagCollection GetMostPopularTags(Type type, ISite site, Boolean siteIsGlobal, String searchFor, WildCardType wildCard,
                                         Int32 maxItems);

        IPredefinedTag AddPredefinedTag(IPredefinedTag predefinedTag);

        void RemovePredefinedTag(IPredefinedTag predefinedTag);

        PredefinedTagCollection GetPredefinedTags();

        PredefinedTagCollection GetPredefinedTags(Type type, ISite site);

        PredefinedTagCollection GetPredefinedTags(Type type, IUser user);

        PredefinedTagCollection GetPredefinedTags(Type type, ISite site, IUser user);

        TagCloud GetTagCloud();

        TagCloud GetTagCloud(Int32 numItems);

        TagCloud GetTagCloud(Type type, ISite site, DateTime since);

        TagCloud GetTagCloud(ITaggableEntity e, DateTime since, Int32 numItems);

        TagCloud GetTagCloud(ITaggableEntity e, IUser user, Int32 numItems);

        TagCloud GetTagCloud(Type type, ISite site, DateTime since, Int32 numItems);

        TagCloud GetTagCloud(Type type, ISite site, IUser user, Int32 numItems);

        TagCloud GetTagCloud(Type type, IUser user);

        TagCloud GetTagCloud(Type type, IUser user, Int32 numItems);

        TagCloud GetTagCloud(IUser user);

        TagCloud GetTagCloud(IUser user, Int32 numItems);

        event EPiServerCommonEventHandler TagAdded;

        event TagPredefinitionEventHandler TagPredefined;

        event EPiServerCommonEventHandler TagRemoved;

        event TagPredefinitionEventHandler TagPredefinitionRemoved;

        event EPiServerCommonEventHandler EntityTagAdded;

        event EPiServerCommonEventHandler EntityTagRemoved;
    }
}